#!/bin/python
from vBaum import *
from math import *
from time import time
from MeshSplitter import split_n_pieces

#meshVolume = Mesh("tower_cut.obj", 50)
#meshVolume.exportAsObj("tower_cut_import", 60, 8)

meshVolume = Mesh("Buddha2.obj", 600)
#meshVolume.exportAsObj("Buddha2_import", 600, 8)


i = 0
t0 = time()
for s in split_n_pieces(meshVolume, 5):
	s.exportAsObj("Buddha_split" + str(i), 600, 8)
	i += 1
print("Execution time: " + str(time() - t0))